1. Field of the Invention
The present invention relates to mark-up language documents, and more particularly to techniques for invoking system commands from within a mark-up language document.
2. Description of Related Art
Mark-up languages have become exceedingly popular tools for authoring electronic content. Mark-up languages used today include, for example, Standard Generalized Markup Language (SGML), HyperText Markup Language (HTML), eXtensible Markup Language (XML), eXtensible HyperText Markup Language (XHTML), and Synchronized Multimedia Integration Language (SMIL). These languages allow the developer to “mark-up” a document. For example, tags may be inserted within the document to specify how the document, or a portion of the document, should be formatted or displayed. As another example, links may be used to define relationships between the document and other documents and to allow a user to jump from one document to another. Links may also be used to perform various functions including, for example, to create tool bars, to link to a cascading style sheet (rev=stylesheet), a script (rev=script), or a printable version (like a .pdf) of the document (rev=print), and to embed authorship details. Links may also perform a variety of functions, including executing a string of commands such as JavaScript commands.
When viewed through an application program, such as a web browser or a reading device (discussed herein), links are commonly depicted as underlined text having a blue or red color. In the mark-up language document itself, the link is designated by a link attribute and corresponding language to indicate the resource to which it refers. The link attributes generally include, for example, the following: href (URL for linked resource); id (SGML ID attribute); rel (forward link types); rev (reverse link types); and title (advisory title string). Examples of links within a mark-up language document include:    1) <A HREF=“http://msn.com”>    2) <A HREF=“ftp://msn.com”>    3) <A HREF=“javascript://msn.com”>    4) <A HREF=“mailto:jdoe@webreference.com”>
The first link refers to a HyperText Transfer Protocol (HTTP) and provides a Uniform Resource Locator (URL) to which the system should jump. The second link refers to a File Transfer Protocol (FTP) and provides a file the system should retrieve. The third link provides JavaScript that the system should run. The fourth link provides an e-mail address to which the system should send an e-mail message.
Because of their versatility, mark-up languages are now used in a number of applications. One such application is for authoring web-page content. Another such application that is rapidly gaining recognition is for so-called “electronic books” or “e-books.” E-books are electronic publications (such as books, journals, magazines, etc.) that can be viewed using computer-based display devices. Application programs running on these reading devices display the e-book content. Examples of such reading devices include the “ROCKET EBOOK” by NuvoMedia, Inc. and the “SOFTBOOK READER” by Softbook Press, Inc. Alternatively, these devices may be traditional computing devices such as personal computers.
E-books are provided in a mark-up language format. As a result, e-book pages may be formatted and linked using the commands available in the mark-up language. For example, e-books may be formatted in a general format in accordance with an Open eBook standard. This standard is set forth in Open eBook Publication Structure 1.0, which can be found at www.openebook.org. This publication is incorporated herein by reference in its entirety.
One aspect of e-books is that it may be desirable to perform various system commands while viewing an e-book. Consider, for example, a user viewing an e-book from a personal computing environment. The user may wish to adjust the font settings. Present systems are limiting in that the user must take several steps to invoke system commands and operations. To adjust font settings, the user must exit the window for the e-book viewing program, call up the specific commands from the operating system to adjust the font, and then return to the e-book. This may be particularly disruptive where the user is in the middle of reading an e-book. It is therefore desirable to have a system where system commands may be more conveniently accessed and performed without interrupting the user's activity.
Certain techniques can be used to perform functions within a mark-up language document. In particular, JavaScript may be directly embedded with a tag within the mark-up language document. The tag may designate the JavaScript such that when a user selects the corresponding link, the JavaScript is executed. However, this technique is limiting in that the JavaScript may only perform limited operations and, more significantly, cannot execute system commands outside of the application program reading the JavaScript. Further, the entire JavaScript command set must be included within the mark-up language document. The negative consequence is that possibly undesirable and even malicious functions may be unknowingly executed. Further, the JavaScript-based approach is limiting in that it may unnecessarily increase the size of the document, especially in documents having a large number of JavaScript links. Many e-book documents already are rather large due to the significant amount of text and graphic content. It is therefore desirable to have a system where pre-defined system commands may be easily identified and executed without requiring increased memory for the document.